import React, {Component} from 'react';
import {Text, StyleSheet, Button, ScrollView, View} from 'react-native';

export default class Home extends Component {
  static navigationOptions = {
    title: 'Home',
  };

  render() {
    const { navigate } = this.props.navigation;
    return (
      <View>
        <ScrollView>
          <View style={styles.item}>
            <Button title={'Props & State'} onPress={() => navigate('PropsAndState', {})}/>
          </View>
          <View style={styles.item}>
            <Button title={'State(状态)'} onPress={() => navigate('State', {})}/>
          </View>
        </ScrollView>
      </View>
    );

  }
}

const styles = StyleSheet.create({
  item : {
    margin: 20,
    marginBottom: 0
  },
});